<?php

include_once '../../library/config.php';
include_once '../../model/articlelist.php';

//增加文章

$entity = new ArticleList();
$entity->request();

try {

    if (!entity['myid']) {
        throw new Exception("116");
    }
    //上传ico,图片,视频,音频
    $entity->toKeyValue("shijian", time());
    if (!$entity->append()->submit()) {
        throw new Exception("118");
    }
} catch (Exception $ex) {
    $entity->rsscode($ex);
}

echo $entity->toJson();


